/**
 *  @auth: sce
 *  @date: 17-12-29
 *  @desc: 计数器容器
 **/

import {connect} from 'react-redux'
import {action} from './../reducer/counter'
import Counter from './../view/Counter'

const {increaseAction,subsideAction} = action;

function mapStateToProps({counterReducer}) {
    return {...counterReducer};
}

function mapDispatchToProps(dispatch) {
    return {
        onIncreaseClick : () => dispatch(increaseAction),
        onSubsideClick: () => dispatch(subsideAction)
    }
}

const CounterContainer = connect(
    mapStateToProps,
    mapDispatchToProps
)(Counter);

export default CounterContainer;